A good answer might be:

The last one on the chain.

The other activations on the chain are awaiting results before proceeding. (The inactive circles have already returned results and will never again represent executing code.)


String Equality

Here are some equal strings:

"abc"    equals  "abc"

"abc de" equals "abc de"

And here are some unequal strings:

"ab"     !equals   "abc"
"abC"    !equals   "abc"
"abc"    !equals   "aBc"

Here are the rules for string equality. The symbol x stands for a single character, as does y. The symbol X stands for a string of characters, as does Y. The symbol + stands for concatenation.

1. equals( "", "" )   = true

2. equals( "", X )    = false if X is not the empty string

3. equals( X, "" )    = false if X is not the empty string

4. equals( x+X, y+Y ) = false if x != y

5. equals( x+X, y+Y ) = true  if x == y and equals( X, Y )

Rule 4 means that if you see two strings that start with different characters, they the strings are not equal. For example,

equals( "bat", "radio" ) = false

In the above example, x is the character 'b', X is the string "at", y is the character 'r', Y is the string "adio".

Here is another example:

equals( "rat", "rat" ) = equals( "at", "at")   // rule 5
equals(  "at",  "at" ) = equals(  "t",  "t")   // rule 5
equals(   "t",   "t" ) = equals(   "",   "")   // rule 5
equals(    "",    "" ) = true                  // rule 1

For another example,

equals( "rat", "ra"  ) = equals( "at", "a")    // rule 5
equals(  "at",  "a"  ) = equals(  "t",  "")    // rule 5
equals(   "t",   ""  ) = false                 // rule 3

And yet another example,

equals( "rAt", "rat"  ) = equals( "At", "at")   // rule 5
equals(  "At",  "at"  ) = false                 // rule 4

QUESTION 9:

In the rules for string equality, which rules are the base cases?